package com.learn.ert.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.learn.ert.mapper.ErPermissionMapper;
import com.learn.ert.pojo.ErPermissionEntity;
import com.learn.ert.service.ErPermissionService;
import com.learn.ert.utils.PageUtils;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 
 *
 * @author sjf
 * @email 2334593702@qq.com
 * @date 2020-08-14 17:47:02
 */
@RestController
@RequestMapping("api/erpermission")
@Api(tags = "权限信息接口")
public class ErPermissionController {
    @Autowired
    private ErPermissionService erPermissionService;

    /**
     * 列表
     */
  /*  @RequestMapping("/list")
  //  @RequiresPermissions("api:erpermission:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = erPermissionMapper.queryPage(params);

        return R.ok().put("page", page);
    }


    *//**
     * 信息
     *//*
    @RequestMapping("/info/{pId}")
   // @RequiresPermissions("api:erpermission:info")
    public R info(@PathVariable("pId") Integer pId){
		ErPermissionEntity erPermission = erPermissionMapper.selectById(pId);

        return R.ok().put("erPermission", erPermission);
    }

    *//**
     * 保存
     *//*
    @RequestMapping("/save")
   // @RequiresPermissions("api:erpermission:save")
    public R save(@RequestBody ErPermissionEntity erPermission){
		erPermissionMapper.insert(erPermission);

        return R.ok();
    }

    *//**
     * 修改
     *//*
    @RequestMapping("/update")
    //@RequiresPermissions("api:erpermission:update")
    public R update(@RequestBody ErPermissionEntity erPermission){
		erPermissionMapper.updateById(erPermission);

        return R.ok();
    }*/

    /**
     * 删除
     */
//    @RequestMapping("/delete")
//    //@RequiresPermissions("api:erpermission:delete")
//    public R delete(@RequestBody Integer[] pIds){
//		erPermissionMapper.removeByIds(Arrays.asList(pIds));
//
//        return R.ok();
//    }

}
